package com.mmt.www.mart.order;

import org.apache.log4j.Logger;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.mmt.www.mart.order.interpace.OrderController;
import com.mmt.www.mart.order.interpace.OrderService;

@RequestMapping(value = "/order")
@Controller
public class OrderControllerImpl implements OrderController{

	String path = "";
	
	Logger log = Logger.getLogger(this.getClass());	
	
	@Resource(name = "OrderService")OrderService os;	

	@Override
	public String orderPage() {
		// TODO Auto-generated method stub
		return null;
	}

	@RequestMapping(value = "/list") @Override
	public String orderProcess(OrderDto dto, Model model, HttpSession session) {
		log.debug("orderProcess() 메소드 진입");
		model.addAttribute("orderList", os.orderExecute(dto, model, session));
		log.debug("성공!");
		return "mart/order/order_list";
	}	
}
